public class HelloWorld1 {

    public static void main14(String[] args) {
        float a = 10;
        short b = 128;
        byte c = (byte)b;
        System.out.println(c);

    }
    public static void main13(String[] args) {
        //类型提升2
        byte a = 10;
        byte b = 20;
        byte c =(byte)(a+b);
        //小于4个字节的在运算的时候，会提升4个字节
        System.out.println(c);
    }

    public static void main12(String[] args) {
        //类型提升1
        int a = 10;
        long b = 20L;
        int c = (int)(a+b);
        //a提升为8个字节 然后和b参与运算--》 8个字节的结果
        long d = a+b;
    }

    public static void main11(String[] args) {
        int a = 10;
        long b = 20L;
        a = (int)b; //long->int，数据范围由大到小，强制转换
        b = a; //int->long,数据范围由小到大，隐式转换
        System.out.println(a);
        System.out.println(b);

        int c = 10;
        float d = 10.5f;//float表示的数据宽度更大
        c = (int)d;
        d = c;
        System.out.println(c);
        System.out.println(d);
    }

    //C语言中0是假 非0即是真
    // 在Java中，真只有一个true，假只有一个false
    public static void main10(String[] args) {
        //JVM 没有明确大小
        boolean a = true;
        boolean b = false;
        System.out.println(a);
        System.out.println(b);
    }

    public static void main9(String[] args) {
        //字符类型2字节 16bit  包装类Character
        char a = 'a';
        System.out.println(a);
        char a2 = '黄';
        System.out.println(a2);

        char a3 = 98;//输出ASCII码字符集 不存在负数
        System.out.println(a3);
    }

    public static void main8(String[] args) {
        //float占有4个字节
        float a = 10.5f;
        System.out.println(a);
    }

    public static void main7(String[] args) {
        //double占用8个字节
        double a = 3.14000;
        System.out.println(a);
        double b = 1.1;
        System.out.println(b*b);
        //小数其实没有精确的 只能精确到某一位上
        /*System.out.printf("%.2f\n",a);//不常用
        System.out.printf("%f",a);
        int x = 1;
        int y = 3;
        System.out.println(x/y);//块注释CTRL+shift+/
        //行注释CTRL+/*/
    }

    public static void main6(String[] args) {
        //byte占用1个字节 8bit -2^7--2^7-1
        byte a = 10;
        System.out.println(a);
        System.out.println(Byte.MIN_VALUE);
        System.out.println(Byte.MAX_VALUE);
    }

    public static void main5(String[] args) {
        //short占用2个字节 16bit -2^15--2^15-1
        short a = 10;
        System.out.println(a);
        System.out.println(Short.MIN_VALUE);
        System.out.println(Short.MAX_VALUE);
    }

    public static void main4(String[] args) {
        //long占用8个字节
        long a = 10;
        System.out.println(a);
        System.out.println(Long.MIN_VALUE);
        System.out.println(Long.MAX_VALUE);
    }

    public static void main3(String[] args) {
        /*
        1.a是整型变量，int占用4个字节
        字节
        bit byte kb mb gb tb pb
         */
        int a = 10;
        System.out.println(a);
        //                 包装类
        System.out.println(Integer.MAX_VALUE);
        System.out.println(Integer.MIN_VALUE);
    }

    public static void main2(String[] args) {
        int a = 10;
        System.out.println(a);
    }
    /*

     */
    //m main psvm

    public static void main1(String[] args) {
        //sout
        System.out.println("hello");
    }
}
